DX11 SET SPRITE CONSTANT BUFFER

Sets a constant buffer to be used with the pixel shader associated with the given sprite.
This facilitates for efficiently sending constant data to the shader that needs to be updates based on the state of the main program.
Note that all sprite constant buffers will be bound to the GPU register b1 (second buffer); register b0 (first buffer) will always contain the
World and WorldViewProjection matrices for the currently rendered sprite. If a constant buffer is set for a sprite but its current shader doesn't
use it it will simply be ignored, so it is perfectly safe to set a constant buffer and swap between using a custom shader and the default shader without
having to remove the constant buffer in-between. If you do want to remove a set constant buffer for a certain sprite you can set the constantBuffer
argument to nullptr (0).
Also note that just because sprites can have unique constant buffers, they don't have to; it is perfectly plausible to use the very same constant
buffer for several sprites.

  Syntax
DX11 SET SPRITE CONSTANT BUFFER sprite, constantBuffer
  Parameters
sprite
Dword
The sprite to set the constant buffer of.
constantBuffer
Dword
The constant buffer to set for the given sprite. Set this to nullptr (0) to remove any previously set constant buffer from the sprite.

  Returns

This function does not return a value.

  See also

SPRITE Functions Menu
DX11 Function Categories